﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class CzLine
    {
        private double a;
        private double b;
        public double A
        {
            get { return a; }
        }
        public double B
        {
            get { return b; }
        }
        public CzLine(double a,double b)
            {
            this.a = a;
            this.b = b;
            }
        public CzLine(CzPoint p1,CzPoint p2)
        {
            this.a = (p2.Y - p1.Y) / (p2.X - p1.X);
            this.b = p1.Y - this.a * p1.X;
        }
        public void Move(double x)
        {
            b += x;
        }
        public bool Contains(CzPoint p1)
        {
            return p1.Y == a * p1.X + b;
        }
    }

}
